/*
 * ScheduleTable.h
 *
 *  Created on: 2009-8-2
 *      Author: ws
 */

#ifndef SCHEDULETABLE_H_
#define SCHEDULETABLE_H_
#include<vector>

#include"ReserveTable.hpp"
class Instruction;
class CtrFlow;
/*
 * for cluster_assign , record the resource usage
 */
class ScheduleTable {
private:
	std::vector<ReserveTable> table;
public:
	ScheduleTable(int schedule_lenth);
	virtual ~ScheduleTable();
	void submit_start_node(Instruction * n, std::vector<CtrFlow*>& inflows);
	void submit_end_node(Instruction * n, std::vector<CtrFlow*>& outflows);
	//check the option is content, resource constraint , data dependence constraint
	bool check_option(Instruction* n, int time);
	//before submit_node the check_option must be test!!
	void submit_node(Instruction * n, int time);
};

#endif /* SCHEDULETABLE_H_ */
